Textbox
A text input field in which the user can enter text. It is similar to the HTML input element. Only one line of text is displayed by default. The multiline attribute can be specified to display a field with multiple rows.
More information about Textbox
Example:
<label control="your-name" value="Enter your name:"/>
<textbox id="your-name"/>
Attributes:
Attributes inherited from XUL Element
If this attribute is set to true, the textbox is disabled. This is usually drawn with the text in grey. If the textbox is disabled, the function of the button cannot be performed. Leave the attribute out entirely for a regular enabled button.
This attribute is set to true if the textbox element is focused.
The maximum number of characters that the textbox allows to be entered.
If true, the textbox displays multiple lines. If the user presses ENTER, a new line is started. If false, the textbox only allows entry of one line.
This event is sent when a user enters text in a textbox. This event is only called when the text displayed would change, thus it is not called when the user presses non-displayable keys.
If set to true, then the user cannot modify the value of the textbox. However, the value may still be modified by a script.
The number of characters that can be displayed in the textbox.
You can set this attribute to the special value 'password' to create a textbox that hides what it types. This is usually used for password entry fields. Use the value 'autocomplete' to create a textbox that supports autocomplete. Use the value 'text' for a regular textbox.
The default value entered in the textbox.
Properties and Methods:
Properties and Methods inherited from XUL Element
Get or modify the end of the selected portion of the field's text. Use in conjuction with the selectionEnd property. The value specifies the index of the character after the selection. If this value is equal to the selectionStart property, no text is selected, but the value indicates the position of the cursor within the textbox.
Get or modify the beginning of the selected portion of the field's text. Use in conjuction with the selectionEmd property. The value specifies the index of the first selected character.
Sets the selected portion of the textbox, where the start argument is the index of the first character to select and the end argument is the index of the character after the selection. Set both arguments to the same value to move the cursor to the corresponding position.
Holds the length of the text entered in the textbox. This property is read only.